package com.pmcc.cj.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.entity.UUIDEntity;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * 区域机构     绑定唯一激活码
 * Created by tomas on 2020/10/1.
 */
@Entity
@Table(name = "cj_area_agency")
public class CjAreaAgency extends UUIDEntity {
    @Column(name = "parent_id")
    private String parentId;//
    @Column(name = "address")
    private String address;//区域
    @Column(name = "code")
    private String code;//区域编码
    @Column(name = "activation_code")
    private String activationCode;//激活码
    @Column(name = "bo_active")
    private Boolean boActive;//是否被开放
    @Column(name = "use_date")
    private Date useDate;//激活码使用时间
    @Column(name = "employee_id")
    private String employeeId;//申请人id
    @Column(name = "employee")
    private String employee;//申请人
    @Column(name = "del_flag")
    private Integer delFlag;//删除标记
    @Column(name = "level")
    private Integer level;//等级 1-5级


    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getEmployee() {
        return employee;
    }

    public void setEmployee(String employee) {
        this.employee = employee;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getActivationCode() {
        return activationCode;
    }

    public void setActivationCode(String activationCode) {
        this.activationCode = activationCode;
    }

    public Boolean getBoActive() {
        return boActive;
    }

    public void setBoActive(Boolean boActive) {
        this.boActive = boActive;
    }

    @JsonSerialize(using = DateTimeFormat.class)
    public Date getUseDate() {
        return useDate;
    }

    public void setUseDate(Date useDate) {
        this.useDate = useDate;
    }

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }
}
